package com.ouc.openplatform.zykt.authManage.service.impl;

import java.util.List;

import com.ouc.openplatform.zykt.authManage.dao.NJ_LogDAO;
import com.ouc.openplatform.zykt.authManage.model.NJ_Log;
import com.ouc.openplatform.zykt.authManage.service.NJ_LogService;
public class NJ_LogServiceImpl implements NJ_LogService{
private NJ_LogDAO logDao;
	
	public NJ_LogDAO getLogDao() {
		return logDao;
	}

	public void setLogDao(NJ_LogDAO logDao) {
		this.logDao = logDao;
	}

	@Override
	public List<NJ_Log>getAllLog(){
		List<NJ_Log> logList = logDao.getAllLog();
		return logList;
	}
	
	@Override
	public int saveLog(NJ_Log log){
		int flag = logDao.insert(log);
		System.out.println(Integer.toString(flag));
		return flag;
	}
	
	@Override
	public int updateLog(NJ_Log log){
		int flag=logDao.updateByPrimaryKeySelective(log);
		return flag;
	}
	
	@Override
	public int deleteLog(int id){
		int flag=logDao.deleteByPrimaryKey(id);
		return flag;
	}
}
